In [ ]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
import seaborn as sb
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)
import zipfile
In [ ]:
pd.set_option('display.max_columns', 700)
pd.set_option('display.max_colwidth', 100)
In [ ]:
pisadict2012 = pd.read_csv('./data/pisadict2012.csv', encoding='latin-1', low_memory=False, index_col=0).T
In [ ]:
pisadict2012
Out[ ]:
CNT SUBNATIO STRATUM OECD NC SCHOOLID STIDSTD ST01Q01 ST02Q01 ST03Q01 ST03Q02 ST04Q01 ST05Q01 ST06Q01 ST07Q01 ST07Q02 ST07Q03 ST08Q01 ST09Q01 ST115Q01 ST11Q01 ST11Q02 ST11Q03 ST11Q04 ST11Q05 ST11Q06 ST13Q01 ST14Q01 ST14Q02 ST14Q03 ST14Q04 ST15Q01 ST17Q01 ST18Q01 ST18Q02 ST18Q03 ST18Q04 ST19Q01 ST20Q01 ST20Q02 ST20Q03 ST21Q01 ST25Q01 ST26Q01 ST26Q02 ST26Q03 ST26Q04 ST26Q05 ST26Q06 ST26Q07 ST26Q08 ST26Q09 ST26Q10 ST26Q11 ST26Q12 ST26Q13 ST26Q14 ST26Q15 ST26Q16 ST26Q17 ST27Q01 ST27Q02 ST27Q03 ST27Q04 ST27Q05 ST28Q01 ST29Q01 ST29Q02 ST29Q03 ST29Q04 ST29Q05 ST29Q06 ST29Q07 ST29Q08 ST35Q01 ST35Q02 ST35Q03 ST35Q04 ST35Q05 ST35Q06 ST37Q01 ST37Q02 ST37Q03 ST37Q04 ST37Q05 ST37Q06 ST37Q07 ST37Q08 ST42Q01 ST42Q02 ST42Q03 ST42Q04 ST42Q05 ST42Q06 ST42Q07 ST42Q08 ST42Q09 ST42Q10 ST43Q01 ST43Q02 ST43Q03 ST43Q04 ST43Q05 ST43Q06 ST44Q01 ST44Q03 ST44Q04 ST44Q05 ST44Q07 ST44Q08 ST46Q01 ST46Q02 ST46Q03 ST46Q04 ST46Q05 ST46Q06 ST46Q07 ST46Q08 ST46Q09 ST48Q01 ST48Q02 ST48Q03 ST48Q04 ST48Q05 ST49Q01 ST49Q02 ST49Q03 ST49Q04 ST49Q05 ST49Q06 ST49Q07 ST49Q09 ST53Q01 ST53Q02 ST53Q03 ST53Q04 ST55Q01 ST55Q02 ST55Q03 ST55Q04 ST57Q01 ST57Q02 ST57Q03 ST57Q04 ST57Q05 ST57Q06 ST61Q01 ST61Q02 ST61Q03 ST61Q04 ST61Q05 ST61Q06 ST61Q07 ST61Q08 ST61Q09 ST62Q01 ST62Q02 ST62Q03 ST62Q04 ST62Q06 ST62Q07 ST62Q08 ST62Q09 ST62Q10 ST62Q11 ST62Q12 ST62Q13 ST62Q15 ST62Q16 ST62Q17 ST62Q19 ST69Q01 ST69Q02 ST69Q03 ST70Q01 ST70Q02 ST70Q03 ST71Q01 ST72Q01 ST73Q01 ST73Q02 ST74Q01 ST74Q02 ST75Q01 ST75Q02 ST76Q01 ST76Q02 ST77Q01 ST77Q02 ST77Q04 ST77Q05 ST77Q06 ST79Q01 ST79Q02 ST79Q03 ST79Q04 ST79Q05 ST79Q06 ST79Q07 ST79Q08 ST79Q10 ST79Q11 ST79Q12 ST79Q15 ST79Q17 ST80Q01 ST80Q04 ST80Q05 ST80Q06 ST80Q07 ST80Q08 ST80Q09 ST80Q10 ST80Q11 ST81Q01 ST81Q02 ST81Q03 ST81Q04 ST81Q05 ST82Q01 ST82Q02 ST82Q03 ST83Q01 ST83Q02 ST83Q03 ST83Q04 ST84Q01 ST84Q02 ST84Q03 ST85Q01 ST85Q02 ST85Q03 ST85Q04 ST86Q01 ST86Q02 ST86Q03 ST86Q04 ST86Q05 ST87Q01 ST87Q02 ST87Q03 ST87Q04 ST87Q05 ST87Q06 ST87Q07 ST87Q08 ST87Q09 ST88Q01 ST88Q02 ST88Q03 ST88Q04 ST89Q02 ST89Q03 ST89Q04 ST89Q05 ST91Q01 ST91Q02 ST91Q03 ST91Q04 ST91Q05 ST91Q06 ST93Q01 ST93Q03 ST93Q04 ST93Q06 ST93Q07 ST94Q05 ST94Q06 ST94Q09 ST94Q10 ST94Q14 ST96Q01 ST96Q02 ST96Q03 ST96Q05 ST101Q01 ST101Q02 ST101Q03 ST101Q05 ST104Q01 ST104Q04 ST104Q05 ST104Q06 IC01Q01 IC01Q02 IC01Q03 IC01Q04 IC01Q05 IC01Q06 IC01Q07 IC01Q08 IC01Q09 IC01Q10 IC01Q11 IC02Q01 IC02Q02 IC02Q03 IC02Q04 IC02Q05 IC02Q06 IC02Q07 IC03Q01 IC04Q01 IC05Q01 IC06Q01 IC07Q01 IC08Q01 IC08Q02 IC08Q03 IC08Q04 IC08Q05 IC08Q06 IC08Q07 IC08Q08 IC08Q09 IC08Q11 IC09Q01 IC09Q02 IC09Q03 IC09Q04 IC09Q05 IC09Q06 IC09Q07 IC10Q01 IC10Q02 IC10Q03 IC10Q04 IC10Q05 IC10Q06 IC10Q07 IC10Q08 IC10Q09 IC11Q01 IC11Q02 IC11Q03 IC11Q04 IC11Q05 IC11Q06 IC11Q07 IC22Q01 IC22Q02 IC22Q04 IC22Q06 IC22Q07 IC22Q08 EC01Q01 EC02Q01 EC03Q01 EC03Q02 EC03Q03 EC03Q04 EC03Q05 EC03Q06 EC03Q07 EC03Q08 EC03Q09 EC03Q10 EC04Q01A EC04Q01B EC04Q01C EC04Q02A EC04Q02B EC04Q02C EC04Q03A EC04Q03B EC04Q03C EC04Q04A EC04Q04B EC04Q04C EC04Q05A EC04Q05B EC04Q05C EC04Q06A EC04Q06B EC04Q06C EC05Q01 EC06Q01 EC07Q01 EC07Q02 EC07Q03 EC07Q04 EC07Q05 EC08Q01 EC08Q02 EC08Q03 EC08Q04 EC09Q03 EC10Q01 EC11Q02 EC11Q03 EC12Q01 ST22Q01 ST23Q01 ST23Q02 ST23Q03 ST23Q04 ST23Q05 ST23Q06 ST23Q07 ST23Q08 ST24Q01 ST24Q02 ST24Q03 CLCUSE1 CLCUSE301 CLCUSE302 DEFFORT QUESTID BOOKID EASY AGE GRADE PROGN ANXMAT ATSCHL ATTLNACT BELONG BFMJ2 BMMJ1 CLSMAN COBN_F COBN_M COBN_S COGACT CULTDIST CULTPOS DISCLIMA ENTUSE ESCS EXAPPLM EXPUREM FAILMAT FAMCON FAMCONC FAMSTRUC FISCED HEDRES HERITCUL HISCED HISEI HOMEPOS HOMSCH HOSTCUL ICTATTNEG ICTATTPOS ICTHOME ICTRES ICTSCH IMMIG INFOCAR INFOJOB1 INFOJOB2 INSTMOT INTMAT ISCEDD ISCEDL ISCEDO LANGCOMM LANGN LANGRPPD LMINS MATBEH MATHEFF MATINTFC MATWKETH MISCED MMINS MTSUP OCOD1 OCOD2 OPENPS OUTHOURS PARED PERSEV REPEAT SCMAT SMINS STUDREL SUBNORM TCHBEHFA TCHBEHSO TCHBEHTD TEACHSUP TESTLANG TIMEINT USEMATH USESCH WEALTH ANCATSCHL ANCATTLNACT ANCBELONG ANCCLSMAN ANCCOGACT ANCINSTMOT ANCINTMAT ANCMATWKETH ANCMTSUP ANCSCMAT ANCSTUDREL ANCSUBNORM PV1MATH PV2MATH PV3MATH PV4MATH PV5MATH PV1MACC PV2MACC PV3MACC PV4MACC PV5MACC PV1MACQ PV2MACQ PV3MACQ PV4MACQ PV5MACQ PV1MACS PV2MACS PV3MACS PV4MACS PV5MACS PV1MACU PV2MACU PV3MACU PV4MACU PV5MACU PV1MAPE PV2MAPE PV3MAPE PV4MAPE PV5MAPE PV1MAPF PV2MAPF PV3MAPF PV4MAPF PV5MAPF PV1MAPI PV2MAPI PV3MAPI PV4MAPI PV5MAPI PV1READ PV2READ PV3READ PV4READ PV5READ PV1SCIE PV2SCIE PV3SCIE PV4SCIE PV5SCIE W_FSTUWT W_FSTR1 W_FSTR2 W_FSTR3 W_FSTR4 W_FSTR5 W_FSTR6 W_FSTR7 W_FSTR8 W_FSTR9 W_FSTR10 W_FSTR11 W_FSTR12 W_FSTR13 W_FSTR14 W_FSTR15 W_FSTR16 W_FSTR17 W_FSTR18 W_FSTR19 W_FSTR20 W_FSTR21 W_FSTR22 W_FSTR23 W_FSTR24 W_FSTR25 W_FSTR26 W_FSTR27 W_FSTR28 W_FSTR29 W_FSTR30 W_FSTR31 W_FSTR32 W_FSTR33 W_FSTR34 W_FSTR35 W_FSTR36 W_FSTR37 W_FSTR38 W_FSTR39 W_FSTR40 W_FSTR41 W_FSTR42 W_FSTR43 W_FSTR44 W_FSTR45 W_FSTR46 W_FSTR47 W_FSTR48 W_FSTR49 W_FSTR50 W_FSTR51 W_FSTR52 W_FSTR53 W_FSTR54 W_FSTR55 W_FSTR56 W_FSTR57 W_FSTR58 W_FSTR59 W_FSTR60 W_FSTR61 W_FSTR62 W_FSTR63 W_FSTR64 W_FSTR65 W_FSTR66 W_FSTR67 W_FSTR68 W_FSTR69 W_FSTR70 W_FSTR71 W_FSTR72 W_FSTR73 W_FSTR74 W_FSTR75 W_FSTR76 W_FSTR77 W_FSTR78 W_FSTR79 W_FSTR80 WVARSTRR VAR_UNIT SENWGT_STU VER_STU
x Country code 3-character Adjudicated sub-region code 7-digit code (3-digit country code + region ID + stratum ID) Stratum ID 7-character (cnt + region ID + original stratum ID) OECD country National Centre 6-digit Code School ID 7-digit (region ID + stratum ID + 3-digit school ID) Student ID International Grade National Study Programme Birth - Month Birth -Year Gender Attend <ISCED 0> Age at <ISCED 1> Repeat - <ISCED 1> Repeat - <ISCED 2> Repeat - <ISCED 3> Truancy - Late for School Truancy - Skip whole school day Truancy - Skip classes within school day At Home - Mother At Home - Father At Home - Brothers At Home - Sisters At Home - Grandparents At Home - Others Mother<Highest Schooling> Mother Qualifications - <ISCED level 6> Mother Qualifications - <ISCED level 5A> Mother Qualifications - <ISCED level 5B> Mother Qualifications - <ISCED level 4> Mother Current Job Status Father<Highest Schooling> Father Qualifications - <ISCED level 6> Father Qualifications - <ISCED level 5A> Father Qualifications - <ISCED level 5B> Father Qualifications - <ISCED level 4> Father Current Job Status Country of Birth International - Self Country of Birth International - Mother Country of Birth International - Father Age of arrival in <country of test> International Language at Home Possessions - desk Possessions - own room Possessions - study place Possessions - computer Possessions - software Possessions - Internet Possessions - literature Possessions - poetry Possessions - art Possessions - textbooks Possessions - <technical reference books> Possessions - dictionary Possessions - dishwasher Possessions - <DVD> Possessions - <Country item 1> Possessions - <Country item 2> Possessions - <Country item 3> How many - cellular phones How many - televisions How many - computers How many - cars How many - rooms bath or shower How many books at home Math Interest - Enjoy Reading Instrumental Motivation - Worthwhile for Work Math Interest - Look Forward to Lessons Math Interest - Enjoy Maths Instrumental Motivation - Worthwhile for Career Chances Math Interest - Interested Instrumental Motivation - Important for Future Study Instrumental Motivation - Helps to Get a Job Subjective Norms -Friends Do Well in Mathematics Subjective Norms -Friends Work Hard on Mathematics Subjective Norms - Friends Enjoy Mathematics Tests Subjective Norms - Parents Believe Studying Mathematics Is Important Subjective Norms - Parents Believe Mathematics Is Important for Career Subjective Norms - Parents Like Mathematics Math Self-Efficacy - Using a <Train Timetable> Math Self-Efficacy - Calculating TV Discount Math Self-Efficacy - Calculating Square Metres of Tiles Math Self-Efficacy - Understanding Graphs in Newspapers Math Self-Efficacy - Solving Equation 1 Math Self-Efficacy - Distance to Scale Math Self-Efficacy - Solving Equation 2 Math Self-Efficacy - Calculate Petrol Consumption Rate Math Anxiety - Worry That It Will Be Difficult Math Self-Concept - Not Good at Maths Math Anxiety - Get Very Tense Math Self-Concept- Get Good <Grades> Math Anxiety - Get Very Nervous Math Self-Concept - Learn Quickly Math Self-Concept - One of Best Subjects Math Anxiety - Feel Helpless Math Self-Concept - Understand Difficult Work Math Anxiety - Worry About Getting Poor <Grades> Perceived Control - Can Succeed with Enough Effort Perceived Control - Doing Well is Completely Up to Me Perceived Control - Family Demands and Problems Perceived Control - Different Teachers Perceived Control - If I Wanted I Could Perform Well Perceived Control - Perform Poorly Regardless Attributions to Failure - Not Good at Maths Problems Attributions to Failure - Teacher Did Not Explain Well Attributions to Failure - Bad Guesses Attributions to Failure - Material Too Hard Attributions to Failure - Teacher Didnt Get Students Interested Attributions to Failure - Unlucky Math Work Ethic - Homework Completed in Time Math Work Ethic - Work Hard on Homework Math Work Ethic - Prepared for Exams Math Work Ethic - Study Hard for Quizzes Math Work Ethic - Study Until I Understand Everything Math Work Ethic - Pay Attention in Classes Math Work Ethic - Listen in Classes Math Work Ethic - Avoid Distractions When Studying Math Work Ethic - Keep Work Organized Math Intentions - Mathematics vs. Language Courses After School Math Intentions - Mathematics vs. Science Related Major in College Math Intentions - Study Harder in Mathematics vs. Language Classes Math Intentions - Take Maximum Number of Mathematics vs. Science Classes Math Intentions - Pursuing a Career That Involves Mathematics vs. Science Math Behaviour - Talk about Maths with Friends Math Behaviour - Help Friends with Maths Math Behaviour - <Extracurricular> Activity Math Behaviour - Participate in Competitions Math Behaviour - Study More Than 2 Extra Hours a Day Math Behaviour - Play Chess Math Behaviour - Computer programming Math Behaviour - Participate in Math Club Learning Strategies- Important Parts vs. Existing Knowledge vs. Learn by Heart Learning Strategies- Improve Understanding vs. New Ways vs. Memory Learning Strategies - Other Subjects vs. Learning Goals vs. Rehearse Problems Learning Strategies - Repeat Examples vs. Everyday Applications vs. More Information Out of school lessons - <test lang> Out of school lessons - <maths> Out of school lessons - <science> Out of school lessons - other Out-of-School Study Time - Homework Out-of-School Study Time - Guided Homework Out-of-School Study Time - Personal Tutor Out-of-School Study Time - Commercial Company Out-of-School Study Time - With Parent Out-of-School Study Time - Computer Experience with Applied Maths Tasks - Use <Train Timetable> Experience with Applied Maths Tasks - Calculate Price including Tax Experience with Applied Maths Tasks - Calculate Square Metres Experience with Applied Maths Tasks - Understand Scientific Tables Experience with Pure Maths Tasks - Solve Equation 1 Experience with Applied Maths Tasks - Use a Map to Calculate Distance Experience with Pure Maths Tasks - Solve Equation 2 Experience with Applied Maths Tasks - Calculate Power Consumption Rate Experience with Applied Maths Tasks - Solve Equation 3 Familiarity with Math Concepts - Exponential Function Familiarity with Math Concepts - Divisor Familiarity with Math Concepts - Quadratic Function Overclaiming - Proper Number Familiarity with Math Concepts - Linear Equation Familiarity with Math Concepts - Vectors Familiarity with Math Concepts - Complex Number Familiarity with Math Concepts - Rational Number Familiarity with Math Concepts - Radicals Overclaiming - Subjunctive Scaling Familiarity with Math Concepts - Polygon Overclaiming - Declarative Fraction Familiarity with Math Concepts - Congruent Figure Familiarity with Math Concepts - Cosine Familiarity with Math Concepts - Arithmetic Mean Familiarity with Math Concepts - Probability Min in <class period> - <test lang> Min in <class period> - <Maths> Min in <class period> - <Science> No of <class period> p/wk - <test lang> No of <class period> p/wk - <Maths> No of <class period> p/wk - <Science> No of ALL <class period> a week Class Size - No of Students in <Test Language> Class OTL - Algebraic Word Problem in Math Lesson OTL - Algebraic Word Problem in Tests OTL - Procedural Task in Math Lesson OTL - Procedural Task in Tests OTL - Pure Math Reasoning in Math Lesson OTL - Pure Math Reasoning in Tests OTL - Applied Math Reasoning in Math Lesson OTL - Applied Math Reasoning in Tests Math Teaching - Teacher shows interest Math Teaching - Extra help Math Teaching - Teacher helps Math Teaching - Teacher continues Math Teaching - Express opinions Teacher-Directed Instruction - Sets Clear Goals Teacher-Directed Instruction - Encourages Thinking and Reasoning Student Orientation - Differentiates Between Students When Giving Tasks Student Orientation - Assigns Complex Projects Formative Assessment - Gives Feedback Teacher-Directed Instruction - Checks Understanding Student Orientation - Has Students Work in Small Groups Teacher-Directed Instruction - Summarizes Previous Lessons Student Orientation - Plans Classroom Activities Formative Assessment - Gives Feedback on Strengths and Weaknesses Formative Assessment - Informs about Expectations Teacher-Directed Instruction - Informs about Learning Goals Formative Assessment - Tells How to Get Better Cognitive Activation - Teacher Encourages to Reflect Problems Cognitive Activation - Gives Problems that Require to Think Cognitive Activation - Asks to Use Own Procedures Cognitive Activation - Presents Problems with No Obvious Solutions Cognitive Activation - Presents Problems in Different Contexts Cognitive Activation - Helps Learn from Mistakes Cognitive Activation - Asks for Explanations Cognitive Activation - Apply What We Learned Cognitive Activation - Problems with Multiple Solutions Disciplinary Climate - Students Don’t Listen Disciplinary Climate - Noise and Disorder Disciplinary Climate - Teacher Has to Wait Until its Quiet Disciplinary Climate - Students Don’t Work Well Disciplinary Climate - Students Start Working Late Vignette Teacher Support -Homework Every Other Day/Back in Time Vignette Teacher Support - Homework Once a Week/Back in Time Vignette Teacher Support - Homework Once a Week/Not Back in Time Teacher Support - Lets Us Know We Have to Work Hard Teacher Support - Provides Extra Help When Needed Teacher Support - Helps Students with Learning Teacher Support - Gives Opportunity to Express Opinions Vignette Classroom Management - Students Frequently Interrupt/Teacher Arrives Early Vignette Classroom Management - Students Are Calm/Teacher Arrives on Time Vignette Classroom Management - Students Frequently Interrupt/Teacher Arrives Late Classroom Management - Students Listen Classroom Management - Teacher Keeps Class Orderly Classroom Management - Teacher Starts On Time Classroom Management - Wait Long to <Quiet Down> Student-Teacher Relation - Get Along with Teachers Student-Teacher Relation - Teachers Are Interested Student-Teacher Relation - Teachers Listen to Students Student-Teacher Relation - Teachers Help Students Student-Teacher Relation - Teachers Treat Students Fair Sense of Belonging - Feel Like Outsider Sense of Belonging - Make Friends Easily Sense of Belonging - Belong at School Sense of Belonging - Feel Awkward at School Sense of Belonging - Liked by Other Students Sense of Belonging - Feel Lonely at School Sense of Belonging - Feel Happy at School Sense of Belonging - Things Are Ideal at School Sense of Belonging - Satisfied at School Attitude towards School - Does Little to Prepare Me for Life Attitude towards School - Waste of Time Attitude towards School - Gave Me Confidence Attitude towards School- Useful for Job Attitude toward School - Helps to Get a Job Attitude toward School - Prepare for College Attitude toward School - Enjoy Good Grades Attitude toward School - Trying Hard is Important Perceived Control - Can Succeed with Enough Effort Perceived Control - My Choice Whether I Will Be Good Perceived Control - Problems Prevent from Putting Effort into School Perceived Control - Different Teachers Would Make Me Try Harder Perceived Control - Could Perform Well if I Wanted Perceived Control - Perform Poor Regardless Perseverance - Give up easily Perseverance - Put off difficult problems Perseverance - Remain interested Perseverance - Continue to perfection Perseverance - Exceed expectations Openness for Problem Solving - Can Handle a Lot of Information Openness for Problem Solving - Quick to Understand Openness for Problem Solving - Seek Explanations Openness for Problem Solving - Can Link Facts Openness for Problem Solving - Like to Solve Complex Problems Problem Text Message - Press every button Problem Text Message - Trace steps Problem Text Message - Manual Problem Text Message - Ask a friend Problem Route Selection - Read brochure Problem Route Selection - Study map Problem Route Selection - Leave it to brother Problem Route Selection - Just drive Problem Ticket Machine - Similarities Problem Ticket Machine - Try buttons Problem Ticket Machine - Ask for help Problem Ticket Machine - Find ticket office At Home - Desktop Computer At Home - Portable laptop At Home - Tablet computer At Home - Internet connection At Home - Video games console At Home - Cell phone w/o Internet At Home - Cell phone with Internet At Home - Mp3/Mp4 player At Home - Printer At Home - USB (memory) stick At Home - Ebook reader At school - Desktop Computer At school - Portable laptop At school - Tablet computer At school - Internet connection At school - Printer At school - USB (memory) stick At school - Ebook reader First use of computers First access to Internet Internet at School Internet out-of-school - Weekday Internet out-of-school - Weekend Out-of-school 8 - One player games. Out-of-school 8 - ColLabourative games. Out-of-school 8 - Use email Out-of-school 8 - Chat on line Out-of-school 8 - Social networks Out-of-school 8 - Browse the Internet for fun Out-of-school 8 - Read news Out-of-school 8 - Obtain practical information from the Internet Out-of-school 8 - Download music Out-of-school 8 - Upload content Out-of-school 9 - Internet for school Out-of-school 9 - Email students Out-of-school 9 - Email teachers Out-of-school 9 - Download from School Out-of-school 9 - Announcements Out-of-school 9 - Homework Out-of-school 9 - Share school material At School - Chat on line At School - Email At School - Browse for schoolwork At School - Download from website At School - Post on website At School - Simulations At School - Practice and drilling At School - Homework At School - Group work Maths lessons - Draw graph Maths lessons - Calculation with numbers Maths lessons - Geometric figures Maths lessons - Spreadsheet Maths lessons - Algebra Maths lessons - Histograms Maths lessons - Change in graphs Attitudes - Useful for schoolwork Attitudes - Homework more fun Attitudes - Source of information Attitudes - Troublesome Attitudes - Not suitable for schoolwork Attitudes - Too unreliable Miss 2 months of <ISCED 1> Miss 2 months of <ISCED 2> Future Orientation - Internship Future Orientation - Work-site visits Future Orientation - Job fair Future Orientation - Career advisor at school Future Orientation - Career advisor outside school Future Orientation - Questionnaire Future Orientation - Internet search Future Orientation - Tour<ISCED 3-5> institution Future Orientation - web search <ISCED 3-5> prog Future Orientation - <country specific item> Acquired skills - Find job info - Yes, at school Acquired skills - Find job info - Yes, out of school Acquired skills - Find job info - No, never Acquired skills - Search for job - Yes, at school Acquired skills - Search for job - Yes, out of school Acquired skills - Search for job - No, never Acquired skills - Write resume - Yes, at school Acquired skills - Write resume - Yes, out of school Acquired skills - Write resume - No, never Acquired skills - Job interview - Yes, at school Acquired skills - Job interview - Yes, out of school Acquired skills - Job interview - No, never Acquired skills - ISCED 3-5 programs - Yes, at school Acquired skills - ISCED 3-5 programs - Yes, out of school Acquired skills - ISCED 3-5 programs - No, never Acquired skills - Student financing - Yes, at school Acquired skills - Student financing - Yes, out of school Acquired skills - Student financing - No, never First language learned Age started learning <test language> Language spoken - Mother Language spoken - Father Language spoken - Siblings Language spoken - Best friend Language spoken - Schoolmates Activities language - Reading Activities language - Watching TV Activities language - Internet surfing Activities language - Writing emails Types of support <test language> - remedial lessons Amount of support <test language> Attend lessons <heritage language> - focused Attend lessons <heritage language> - school subjects Instruction in <heritage language> Acculturation - Mother Immigrant (Filter) Acculturation - Enjoy <Host Culture> Friends Acculturation - Enjoy <Heritage Culture> Friends Acculturation - Enjoy <Host Culture> Celebrations Acculturation - Enjoy <Heritage Culture> Celebrations Acculturation - Spend Time with <Host Culture> Friends Acculturation - Spend Time with <Heritage Culture> Friends Acculturation - Participate in <Host Culture> Celebrations Acculturation - Participate in <Heritage Culture> Celebrations Acculturation - Perceived Host-Heritage Cultural Differences - Values Acculturation - Perceived Host-Heritage Cultural Differences - Mother Treatment Acculturation - Perceived Host-Heritage Cultural Differences - Teacher Treatment Calculator Use Effort-real 1 Effort-real 2 Difference in Effort Student Questionnaire Form Booklet ID Standard or simplified set of booklets Age of student Grade compared to modal grade in country Unique national study programme code Mathematics Anxiety Attitude towards School: Learning Outcomes Attitude towards School: Learning Activities Sense of Belonging to School Father SQ ISEI Mother SQ ISEI Mathematics Teacher's Classroom Management Country of Birth National Categories- Father Country of Birth National Categories- Mother Country of Birth National Categories- Self Cognitive Activation in Mathematics Lessons Cultural Distance between Host and Heritage Culture Cultural Possessions Disciplinary Climate ICT Entertainment Use Index of economic, social and cultural status Experience with Applied Mathematics Tasks at School Experience with Pure Mathematics Tasks at School Attributions to Failure in Mathematics Familiarity with Mathematical Concepts Familiarity with Mathematical Concepts (Signal Detection Adjusted) Family Structure Educational level of father (ISCED) Home educational resources Acculturation: Heritage Culture Oriented Strategies Highest educational level of parents Highest parental occupational status Home Possessions ICT Use at Home for School-related Tasks Acculturation: Host Culture Oriented Strategies Attitudes Towards Computers: Limitations of the Computer as a Tool for School Learning Attitudes Towards Computers: Computer as a Tool for School Learning ICT Availability at Home ICT resources ICT Availability at School Immigration status Information about Careers Information about the Labour Market provided by the School Information about the Labour Market provided outside of School Instrumental Motivation for Mathematics Mathematics Interest ISCED designation ISCED level ISCED orientation Preference for Heritage Language in Conversations with Family and Friends Language at home (3-digit code) Preference for Heritage Language in Language Reception and Production Learning time (minutes per week) - <test language> Mathematics Behaviour Mathematics Self-Efficacy Mathematics Intentions Mathematics Work Ethic Educational level of mother (ISCED) Learning time (minutes per week)- <Mathematics> Mathematics Teacher's Support ISCO-08 Occupation code - Mother ISCO-08 Occupation code - Father Openness for Problem Solving Out-of-School Study Time Highest parental education in years Perseverance Grade Repetition Mathematics Self-Concept Learning time (minutes per week) - <Science> Teacher Student Relations Subjective Norms in Mathematics Teacher Behaviour: Formative Assessment Teacher Behaviour: Student Orientation Teacher Behaviour: Teacher-directed Instruction Teacher Support Language of the test Time of computer use (mins) Use of ICT in Mathematic Lessons Use of ICT at School Wealth Attitude towards School: Learning Outcomes (Anchored) Attitude towards School: Learning Activities (Anchored) Sense of Belonging to School (Anchored) Mathematics Teacher's Classroom Management (Anchored) Cognitive Activation in Mathematics Lessons (Anchored) Instrumental Motivation for Mathematics (Anchored) Mathematics Interest (Anchored) Mathematics Work Ethic (Anchored) Mathematics Teacher's Support (Anchored) Mathematics Self-Concept (Anchored) Teacher Student Relations (Anchored) Subjective Norms in Mathematics (Anchored) Plausible value 1 in mathematics Plausible value 2 in mathematics Plausible value 3 in mathematics Plausible value 4 in mathematics Plausible value 5 in mathematics Plausible value 1 in content subscale of math - Change and Relationships Plausible value 2 in content subscale of math - Change and Relationships Plausible value 3 in content subscale of math - Change and Relationships Plausible value 4 in content subscale of math - Change and Relationships Plausible value 5 in content subscale of math - Change and Relationships Plausible value 1 in content subscale of math - Quantity Plausible value 2 in content subscale of math - Quantity Plausible value 3 in content subscale of math - Quantity Plausible value 4 in content subscale of math - Quantity Plausible value 5 in content subscale of math - Quantity Plausible value 1 in content subscale of math - Space and Shape Plausible value 2 in content subscale of math - Space and Shape Plausible value 3 in content subscale of math - Space and Shape Plausible value 4 in content subscale of math - Space and Shape Plausible value 5 in content subscale of math - Space and Shape Plausible value 1 in content subscale of math - Uncertainty and Data Plausible value 2 in content subscale of math - Uncertainty and Data Plausible value 3 in content subscale of math - Uncertainty and Data Plausible value 4 in content subscale of math - Uncertainty and Data Plausible value 5 in content subscale of math - Uncertainty and Data Plausible value 1 in process subscale of math - Employ Plausible value 2 in process subscale of math - Employ Plausible value 3 in process subscale of math - Employ Plausible value 4 in process subscale of math - Employ Plausible value 5 in process subscale of math - Employ Plausible value 1 in process subscale of math - Formulate Plausible value 2 in process subscale of math - Formulate Plausible value 3 in process subscale of math - Formulate Plausible value 4 in process subscale of math - Formulate Plausible value 5 in process subscale of math - Formulate Plausible value 1 in process subscale of math - Interpret Plausible value 2 in process subscale of math - Interpret Plausible value 3 in process subscale of math - Interpret Plausible value 4 in process subscale of math - Interpret Plausible value 5 in process subscale of math - Interpret Plausible value 1 in reading Plausible value 2 in reading Plausible value 3 in reading Plausible value 4 in reading Plausible value 5 in reading Plausible value 1 in science Plausible value 2 in science Plausible value 3 in science Plausible value 4 in science Plausible value 5 in science FINAL STUDENT WEIGHT FINAL STUDENT REPLICATE BRR-FAY WEIGHT1 FINAL STUDENT REPLICATE BRR-FAY WEIGHT2 FINAL STUDENT REPLICATE BRR-FAY WEIGHT3 FINAL STUDENT REPLICATE BRR-FAY WEIGHT4 FINAL STUDENT REPLICATE BRR-FAY WEIGHT5 FINAL STUDENT REPLICATE BRR-FAY WEIGHT6 FINAL STUDENT REPLICATE BRR-FAY WEIGHT7 FINAL STUDENT REPLICATE BRR-FAY WEIGHT8 FINAL STUDENT REPLICATE BRR-FAY WEIGHT9 FINAL STUDENT REPLICATE BRR-FAY WEIGHT10 FINAL STUDENT REPLICATE BRR-FAY WEIGHT11 FINAL STUDENT REPLICATE BRR-FAY WEIGHT12 FINAL STUDENT REPLICATE BRR-FAY WEIGHT13 FINAL STUDENT REPLICATE BRR-FAY WEIGHT14 FINAL STUDENT REPLICATE BRR-FAY WEIGHT15 FINAL STUDENT REPLICATE BRR-FAY WEIGHT16 FINAL STUDENT REPLICATE BRR-FAY WEIGHT17 FINAL STUDENT REPLICATE BRR-FAY WEIGHT18 FINAL STUDENT REPLICATE BRR-FAY WEIGHT19 FINAL STUDENT REPLICATE BRR-FAY WEIGHT20 FINAL STUDENT REPLICATE BRR-FAY WEIGHT21 FINAL STUDENT REPLICATE BRR-FAY WEIGHT22 FINAL STUDENT REPLICATE BRR-FAY WEIGHT23 FINAL STUDENT REPLICATE BRR-FAY WEIGHT24 FINAL STUDENT REPLICATE BRR-FAY WEIGHT25 FINAL STUDENT REPLICATE BRR-FAY WEIGHT26 FINAL STUDENT REPLICATE BRR-FAY WEIGHT27 FINAL STUDENT REPLICATE BRR-FAY WEIGHT28 FINAL STUDENT REPLICATE BRR-FAY WEIGHT29 FINAL STUDENT REPLICATE BRR-FAY WEIGHT30 FINAL STUDENT REPLICATE BRR-FAY WEIGHT31 FINAL STUDENT REPLICATE BRR-FAY WEIGHT32 FINAL STUDENT REPLICATE BRR-FAY WEIGHT33 FINAL STUDENT REPLICATE BRR-FAY WEIGHT34 FINAL STUDENT REPLICATE BRR-FAY WEIGHT35 FINAL STUDENT REPLICATE BRR-FAY WEIGHT36 FINAL STUDENT REPLICATE BRR-FAY WEIGHT37 FINAL STUDENT REPLICATE BRR-FAY WEIGHT38 FINAL STUDENT REPLICATE BRR-FAY WEIGHT39 FINAL STUDENT REPLICATE BRR-FAY WEIGHT40 FINAL STUDENT REPLICATE BRR-FAY WEIGHT41 FINAL STUDENT REPLICATE BRR-FAY WEIGHT42 FINAL STUDENT REPLICATE BRR-FAY WEIGHT43 FINAL STUDENT REPLICATE BRR-FAY WEIGHT44 FINAL STUDENT REPLICATE BRR-FAY WEIGHT45 FINAL STUDENT REPLICATE BRR-FAY WEIGHT46 FINAL STUDENT REPLICATE BRR-FAY WEIGHT47 FINAL STUDENT REPLICATE BRR-FAY WEIGHT48 FINAL STUDENT REPLICATE BRR-FAY WEIGHT49 FINAL STUDENT REPLICATE BRR-FAY WEIGHT50 FINAL STUDENT REPLICATE BRR-FAY WEIGHT51 FINAL STUDENT REPLICATE BRR-FAY WEIGHT52 FINAL STUDENT REPLICATE BRR-FAY WEIGHT53 FINAL STUDENT REPLICATE BRR-FAY WEIGHT54 FINAL STUDENT REPLICATE BRR-FAY WEIGHT55 FINAL STUDENT REPLICATE BRR-FAY WEIGHT56 FINAL STUDENT REPLICATE BRR-FAY WEIGHT57 FINAL STUDENT REPLICATE BRR-FAY WEIGHT58 FINAL STUDENT REPLICATE BRR-FAY WEIGHT59 FINAL STUDENT REPLICATE BRR-FAY WEIGHT60 FINAL STUDENT REPLICATE BRR-FAY WEIGHT61 FINAL STUDENT REPLICATE BRR-FAY WEIGHT62 FINAL STUDENT REPLICATE BRR-FAY WEIGHT63 FINAL STUDENT REPLICATE BRR-FAY WEIGHT64 FINAL STUDENT REPLICATE BRR-FAY WEIGHT65 FINAL STUDENT REPLICATE BRR-FAY WEIGHT66 FINAL STUDENT REPLICATE BRR-FAY WEIGHT67 FINAL STUDENT REPLICATE BRR-FAY WEIGHT68 FINAL STUDENT REPLICATE BRR-FAY WEIGHT69 FINAL STUDENT REPLICATE BRR-FAY WEIGHT70 FINAL STUDENT REPLICATE BRR-FAY WEIGHT71 FINAL STUDENT REPLICATE BRR-FAY WEIGHT72 FINAL STUDENT REPLICATE BRR-FAY WEIGHT73 FINAL STUDENT REPLICATE BRR-FAY WEIGHT74 FINAL STUDENT REPLICATE BRR-FAY WEIGHT75 FINAL STUDENT REPLICATE BRR-FAY WEIGHT76 FINAL STUDENT REPLICATE BRR-FAY WEIGHT77 FINAL STUDENT REPLICATE BRR-FAY WEIGHT78 FINAL STUDENT REPLICATE BRR-FAY WEIGHT79 FINAL STUDENT REPLICATE BRR-FAY WEIGHT80 RANDOMIZED FINAL VARIANCE STRATUM (1-80) RANDOMLY ASSIGNED VARIANCE UNIT Senate weight - sum of weight within the country is 1000 Date of the database creation
In [ ]:
with zipfile.ZipFile('./data/pisa2012.csv.zip', 'r') as zip_ref:
    with zip_ref.open('pisa2012.csv') as csv_file:
        pisa2012 = pd.read_csv(csv_file, encoding='latin-1', low_memory=False, index_col=0)
In [ ]:
pisa2012.head()
Out[ ]:
CNT SUBNATIO STRATUM OECD NC SCHOOLID STIDSTD ST01Q01 ST02Q01 ST03Q01 ST03Q02 ST04Q01 ST05Q01 ST06Q01 ST07Q01 ST07Q02 ST07Q03 ST08Q01 ST09Q01 ST115Q01 ST11Q01 ST11Q02 ST11Q03 ST11Q04 ST11Q05 ST11Q06 ST13Q01 ST14Q01 ST14Q02 ST14Q03 ST14Q04 ST15Q01 ST17Q01 ST18Q01 ST18Q02 ST18Q03 ST18Q04 ST19Q01 ST20Q01 ST20Q02 ST20Q03 ST21Q01 ST25Q01 ST26Q01 ST26Q02 ST26Q03 ST26Q04 ST26Q05 ST26Q06 ST26Q07 ST26Q08 ST26Q09 ST26Q10 ST26Q11 ST26Q12 ST26Q13 ST26Q14 ST26Q15 ST26Q16 ST26Q17 ST27Q01 ST27Q02 ST27Q03 ST27Q04 ST27Q05 ST28Q01 ST29Q01 ST29Q02 ST29Q03 ST29Q04 ST29Q05 ST29Q06 ST29Q07 ST29Q08 ST35Q01 ST35Q02 ST35Q03 ST35Q04 ST35Q05 ST35Q06 ST37Q01 ST37Q02 ST37Q03 ST37Q04 ST37Q05 ST37Q06 ST37Q07 ST37Q08 ST42Q01 ST42Q02 ST42Q03 ST42Q04 ST42Q05 ST42Q06 ST42Q07 ST42Q08 ST42Q09 ST42Q10 ST43Q01 ST43Q02 ST43Q03 ST43Q04 ST43Q05 ST43Q06 ST44Q01 ST44Q03 ST44Q04 ST44Q05 ST44Q07 ST44Q08 ST46Q01 ST46Q02 ST46Q03 ST46Q04 ST46Q05 ST46Q06 ST46Q07 ST46Q08 ST46Q09 ST48Q01 ST48Q02 ST48Q03 ST48Q04 ST48Q05 ST49Q01 ST49Q02 ST49Q03 ST49Q04 ST49Q05 ST49Q06 ST49Q07 ST49Q09 ST53Q01 ST53Q02 ST53Q03 ST53Q04 ST55Q01 ST55Q02 ST55Q03 ST55Q04 ST57Q01 ST57Q02 ST57Q03 ST57Q04 ST57Q05 ST57Q06 ST61Q01 ST61Q02 ST61Q03 ST61Q04 ST61Q05 ST61Q06 ST61Q07 ST61Q08 ST61Q09 ST62Q01 ST62Q02 ST62Q03 ST62Q04 ST62Q06 ST62Q07 ST62Q08 ST62Q09 ST62Q10 ST62Q11 ST62Q12 ST62Q13 ST62Q15 ST62Q16 ST62Q17 ST62Q19 ST69Q01 ST69Q02 ST69Q03 ST70Q01 ST70Q02 ST70Q03 ST71Q01 ST72Q01 ST73Q01 ST73Q02 ST74Q01 ST74Q02 ST75Q01 ST75Q02 ST76Q01 ST76Q02 ST77Q01 ST77Q02 ST77Q04 ST77Q05 ST77Q06 ST79Q01 ST79Q02 ST79Q03 ST79Q04 ST79Q05 ST79Q06 ST79Q07 ST79Q08 ST79Q10 ST79Q11 ST79Q12 ST79Q15 ST79Q17 ST80Q01 ST80Q04 ST80Q05 ST80Q06 ST80Q07 ST80Q08 ST80Q09 ST80Q10 ST80Q11 ST81Q01 ST81Q02 ST81Q03 ST81Q04 ST81Q05 ST82Q01 ST82Q02 ST82Q03 ST83Q01 ST83Q02 ST83Q03 ST83Q04 ST84Q01 ST84Q02 ST84Q03 ST85Q01 ST85Q02 ST85Q03 ST85Q04 ST86Q01 ST86Q02 ST86Q03 ST86Q04 ST86Q05 ST87Q01 ST87Q02 ST87Q03 ST87Q04 ST87Q05 ST87Q06 ST87Q07 ST87Q08 ST87Q09 ST88Q01 ST88Q02 ST88Q03 ST88Q04 ST89Q02 ST89Q03 ST89Q04 ST89Q05 ST91Q01 ST91Q02 ST91Q03 ST91Q04 ST91Q05 ST91Q06 ST93Q01 ST93Q03 ST93Q04 ST93Q06 ST93Q07 ST94Q05 ST94Q06 ST94Q09 ST94Q10 ST94Q14 ST96Q01 ST96Q02 ST96Q03 ST96Q05 ST101Q01 ST101Q02 ST101Q03 ST101Q05 ST104Q01 ST104Q04 ST104Q05 ST104Q06 IC01Q01 IC01Q02 IC01Q03 IC01Q04 IC01Q05 IC01Q06 IC01Q07 IC01Q08 IC01Q09 IC01Q10 IC01Q11 IC02Q01 IC02Q02 IC02Q03 IC02Q04 IC02Q05 IC02Q06 IC02Q07 IC03Q01 IC04Q01 IC05Q01 IC06Q01 IC07Q01 IC08Q01 IC08Q02 IC08Q03 IC08Q04 IC08Q05 IC08Q06 IC08Q07 IC08Q08 IC08Q09 IC08Q11 IC09Q01 IC09Q02 IC09Q03 IC09Q04 IC09Q05 IC09Q06 IC09Q07 IC10Q01 IC10Q02 IC10Q03 IC10Q04 IC10Q05 IC10Q06 IC10Q07 IC10Q08 IC10Q09 IC11Q01 IC11Q02 IC11Q03 IC11Q04 IC11Q05 IC11Q06 IC11Q07 IC22Q01 IC22Q02 IC22Q04 IC22Q06 IC22Q07 IC22Q08 EC01Q01 EC02Q01 EC03Q01 EC03Q02 EC03Q03 EC03Q04 EC03Q05 EC03Q06 EC03Q07 EC03Q08 EC03Q09 EC03Q10 EC04Q01A EC04Q01B EC04Q01C EC04Q02A EC04Q02B EC04Q02C EC04Q03A EC04Q03B EC04Q03C EC04Q04A EC04Q04B EC04Q04C EC04Q05A EC04Q05B EC04Q05C EC04Q06A EC04Q06B EC04Q06C EC05Q01 EC06Q01 EC07Q01 EC07Q02 EC07Q03 EC07Q04 EC07Q05 EC08Q01 EC08Q02 EC08Q03 EC08Q04 EC09Q03 EC10Q01 EC11Q02 EC11Q03 EC12Q01 ST22Q01 ST23Q01 ST23Q02 ST23Q03 ST23Q04 ST23Q05 ST23Q06 ST23Q07 ST23Q08 ST24Q01 ST24Q02 ST24Q03 CLCUSE1 CLCUSE301 CLCUSE302 DEFFORT QUESTID BOOKID EASY AGE GRADE PROGN ANXMAT ATSCHL ATTLNACT BELONG BFMJ2 BMMJ1 CLSMAN COBN_F COBN_M COBN_S COGACT CULTDIST CULTPOS DISCLIMA ENTUSE ESCS EXAPPLM EXPUREM FAILMAT FAMCON FAMCONC FAMSTRUC FISCED HEDRES HERITCUL HISCED HISEI HOMEPOS HOMSCH HOSTCUL ICTATTNEG ICTATTPOS ICTHOME ICTRES ICTSCH IMMIG INFOCAR INFOJOB1 INFOJOB2 INSTMOT INTMAT ISCEDD ISCEDL ISCEDO LANGCOMM LANGN LANGRPPD LMINS MATBEH MATHEFF MATINTFC MATWKETH MISCED MMINS MTSUP OCOD1 OCOD2 OPENPS OUTHOURS PARED PERSEV REPEAT SCMAT SMINS STUDREL SUBNORM TCHBEHFA TCHBEHSO TCHBEHTD TEACHSUP TESTLANG TIMEINT USEMATH USESCH WEALTH ANCATSCHL ANCATTLNACT ANCBELONG ANCCLSMAN ANCCOGACT ANCINSTMOT ANCINTMAT ANCMATWKETH ANCMTSUP ANCSCMAT ANCSTUDREL ANCSUBNORM PV1MATH PV2MATH PV3MATH PV4MATH PV5MATH PV1MACC PV2MACC PV3MACC PV4MACC PV5MACC PV1MACQ PV2MACQ PV3MACQ PV4MACQ PV5MACQ PV1MACS PV2MACS PV3MACS PV4MACS PV5MACS PV1MACU PV2MACU PV3MACU PV4MACU PV5MACU PV1MAPE PV2MAPE PV3MAPE PV4MAPE PV5MAPE PV1MAPF PV2MAPF PV3MAPF PV4MAPF PV5MAPF PV1MAPI PV2MAPI PV3MAPI PV4MAPI PV5MAPI PV1READ PV2READ PV3READ PV4READ PV5READ PV1SCIE PV2SCIE PV3SCIE PV4SCIE PV5SCIE W_FSTUWT W_FSTR1 W_FSTR2 W_FSTR3 W_FSTR4 W_FSTR5 W_FSTR6 W_FSTR7 W_FSTR8 W_FSTR9 W_FSTR10 W_FSTR11 W_FSTR12 W_FSTR13 W_FSTR14 W_FSTR15 W_FSTR16 W_FSTR17 W_FSTR18 W_FSTR19 W_FSTR20 W_FSTR21 W_FSTR22 W_FSTR23 W_FSTR24 W_FSTR25 W_FSTR26 W_FSTR27 W_FSTR28 W_FSTR29 W_FSTR30 W_FSTR31 W_FSTR32 W_FSTR33 W_FSTR34 W_FSTR35 W_FSTR36 W_FSTR37 W_FSTR38 W_FSTR39 W_FSTR40 W_FSTR41 W_FSTR42 W_FSTR43 W_FSTR44 W_FSTR45 W_FSTR46 W_FSTR47 W_FSTR48 W_FSTR49 W_FSTR50 W_FSTR51 W_FSTR52 W_FSTR53 W_FSTR54 W_FSTR55 W_FSTR56 W_FSTR57 W_FSTR58 W_FSTR59 W_FSTR60 W_FSTR61 W_FSTR62 W_FSTR63 W_FSTR64 W_FSTR65 W_FSTR66 W_FSTR67 W_FSTR68 W_FSTR69 W_FSTR70 W_FSTR71 W_FSTR72 W_FSTR73 W_FSTR74 W_FSTR75 W_FSTR76 W_FSTR77 W_FSTR78 W_FSTR79 W_FSTR80 WVARSTRR VAR_UNIT SENWGT_STU VER_STU
1 Albania 80000 ALB0006 Non-OECD Albania 1 1 10 1.0 2 1996 Female No 6.0 No, never No, never No, never None None 1.0 Yes Yes Yes Yes NaN NaN <ISCED level 3A> No No No No Other (e.g. home duties, retired) <ISCED level 3A> NaN NaN NaN NaN Working part-time <for pay> Country of test Country of test Country of test NaN Language of the test Yes No Yes No No No No Yes No Yes No Yes No Yes 8002 8001 8002 Two One NaN NaN NaN 0-10 books Agree Strongly agree Agree Agree Agree Agree Agree Strongly agree Disagree Agree Disagree Agree Agree Agree Not at all confident Not very confident Confident Confident Confident Not at all confident Confident Very confident Agree Disagree Agree Agree Agree Agree Agree Disagree Disagree Disagree Agree Disagree Disagree Agree NaN Disagree Likely Slightly likely Likely Likely Likely Very Likely Agree Agree Agree Agree Agree Agree Agree Agree Agree Courses after school Test Language Major in college Science Study harder Test Language Maximum classes Science Pursuing a career Math Often Sometimes Sometimes Sometimes Sometimes Never or rarely Never or rarely Never or rarely NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson Never or Hardly Ever Most Lessons Never or Hardly Ever Every Lesson Most Lessons Every Lesson Every Lesson Every Lesson Never or Hardly Ever Most Lessons Every Lesson Every Lesson Every Lesson Always or almost always Sometimes Never or rarely Always or almost always Always or almost always Always or almost always Always or almost always Often Often Never or Hardly Ever Never or Hardly Ever Never or Hardly Ever Never or Hardly Ever Never or Hardly Ever Strongly disagree Strongly disagree Strongly disagree Strongly disagree Agree Agree Agree Strongly agree Strongly agree Disagree Agree Strongly disagree Disagree Agree Agree Strongly disagree Agree Agree Disagree Agree Agree Strongly disagree Strongly agree Strongly agree Strongly disagree Agree Strongly disagree Agree Agree Strongly agree Strongly disagree Strongly disagree Agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly disagree Disagree Strongly disagree Very much like me Very much like me Very much like me Somewhat like me Very much like me Somewhat like me Mostly like me Mostly like me Mostly like me Somewhat like me definitely do this definitely do this definitely do this definitely do this 4.0 2.0 1.0 1.0 1.0 2.0 1.0 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN A Simple calculator 99 99 99 StQ Form B booklet 7 Standard set of booklets 16.17 0.0 Albania: Upper secondary education 0.32 -2.31 0.5206 -1.18 76.49 79.74 -1.3771 Albania Albania Albania 0.6994 NaN -0.48 1.85 NaN NaN NaN NaN 0.6400 NaN NaN 2.0 ISCED 3A, ISCED 4 -1.29 NaN ISCED 3A, ISCED 4 NaN -2.61 NaN NaN NaN NaN NaN -3.16 NaN Native NaN NaN NaN 0.80 0.91 A ISCED level 3 General NaN Albanian NaN NaN 0.6426 -0.77 -0.7332 0.2882 ISCED 3A, ISCED 4 NaN -0.9508 Building architects Primary school teachers 0.0521 NaN 12.0 -0.3407 Did not repeat a <grade> 0.41 NaN -1.04 -0.0455 1.3625 0.9374 0.4297 1.68 Albanian NaN NaN NaN -2.92 -1.8636 -0.6779 -0.7351 -0.7808 -0.0219 -0.1562 0.0486 -0.2199 -0.5983 -0.0807 -0.5901 -0.3346 406.8469 376.4683 344.5319 321.1637 381.9209 325.8374 324.2795 279.8800 267.4170 312.5954 409.1837 388.1524 373.3525 389.7102 415.4152 351.5423 375.6894 341.4161 386.5945 426.3203 396.7207 334.4057 328.9531 339.8582 354.6580 324.2795 345.3108 381.1419 380.3630 346.8687 319.6059 345.3108 360.8895 390.4892 322.7216 290.7852 345.3108 326.6163 407.6258 367.1210 249.5762 254.3420 406.8496 175.7053 218.5981 341.7009 408.8400 348.2283 367.8105 392.9877 8.9096 13.1249 13.0829 4.5315 13.0829 13.9235 13.1249 13.1249 4.3389 4.3313 13.7954 4.5315 4.3313 13.7954 13.9235 4.3389 4.3313 4.5084 4.5084 13.7954 4.5315 13.1249 13.0829 4.5315 13.0829 13.9235 13.1249 13.1249 4.3389 4.3313 13.7954 4.5315 4.3313 13.7954 13.9235 4.3389 4.3313 4.5084 4.5084 13.7954 4.5315 4.5084 4.5315 13.0829 4.5315 4.3313 4.5084 4.5084 13.7954 13.9235 4.3389 13.0829 13.9235 4.3389 4.3313 13.7954 13.9235 13.1249 13.1249 4.3389 13.0829 4.5084 4.5315 13.0829 4.5315 4.3313 4.5084 4.5084 13.7954 13.9235 4.3389 13.0829 13.9235 4.3389 4.3313 13.7954 13.9235 13.1249 13.1249 4.3389 13.0829 19 1 0.2098 22NOV13
2 Albania 80000 ALB0006 Non-OECD Albania 1 2 10 1.0 2 1996 Female Yes, for more than one year 7.0 No, never No, never No, never One or two times None 1.0 Yes Yes NaN Yes NaN NaN <ISCED level 3A> Yes Yes No No Working full-time <for pay> <ISCED level 3A> No No No No Working full-time <for pay> Country of test Country of test Country of test NaN Language of the test Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes 8001 8001 8002 Three or more Three or more Three or more Two Two 201-500 books Disagree Strongly agree Disagree Disagree Agree Agree Disagree Disagree Strongly agree Strongly agree Disagree Agree Disagree Agree Confident Very confident Very confident Confident Very confident Confident Very confident Not very confident NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Strongly agree Strongly agree Strongly disagree Disagree Agree Disagree Likely Slightly likely Slightly likely Very Likely Slightly likely Likely Agree Agree Strongly agree Strongly agree Strongly agree Agree Agree Disagree Agree Courses after school Math Major in college Science Study harder Math Maximum classes Science Pursuing a career Science Sometimes Often Always or almost always Sometimes Always or almost always Never or rarely Never or rarely Often relating to known Improve understanding in my sleep Repeat examples I do not attend <out-of-school time lessons> in this subject 2 or more but less than 4 hours a week 2 or more but less than 4 hours a week Less than 2 hours a week NaN NaN 6.0 0.0 0.0 2.0 Rarely Rarely Frequently Sometimes Frequently Sometimes Frequently Never Frequently Know it well, understand the concept Know it well, understand the concept Heard of it once or twice Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept Never heard of it Know it well, understand the concept Know it well, understand the concept Never heard of it Know it well, understand the concept Heard of it once or twice Know it well, understand the concept Know it well, understand the concept Never heard of it Heard of it often 45.0 45.0 45.0 7.0 6.0 2.0 NaN 30.0 Frequently Sometimes Frequently Frequently Sometimes Sometimes Sometimes Sometimes NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Not at all like me Not at all like me Mostly like me Somewhat like me Very much like me Somewhat like me Not much like me Not much like me Mostly like me Not much like me probably not do this probably do this probably not do this probably do this 1.0 2.0 3.0 2.0 2.0 3.0 1.0 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN A Simple calculator 99 99 99 StQ Form A booklet 9 Standard set of booklets 16.17 0.0 Albania: Upper secondary education NaN NaN NaN NaN 15.35 23.47 NaN Albania Albania Albania NaN NaN 1.27 NaN NaN NaN -0.0681 0.7955 0.1524 0.6387 -0.08 2.0 ISCED 3A, ISCED 4 1.12 NaN ISCED 5A, 6 NaN 1.41 NaN NaN NaN NaN NaN 1.15 NaN Native NaN NaN NaN -0.39 0.00 A ISCED level 3 General NaN Albanian NaN 315.0 1.4702 0.34 -0.2514 0.6490 ISCED 5A, 6 270.0 NaN Tailors, dressmakers, furriers and hatters Building construction labourers -0.9492 8.0 16.0 1.3116 Did not repeat a <grade> NaN 90.0 NaN 0.6602 NaN NaN NaN NaN Albanian NaN NaN NaN 0.69 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 486.1427 464.3325 453.4273 472.9008 476.0165 325.6816 419.9330 378.6493 359.9548 384.1019 373.1968 444.0801 456.5431 401.2385 461.2167 366.9653 459.6588 426.1645 423.0488 443.3011 389.5544 438.6275 417.5962 379.4283 438.6275 440.1854 456.5431 486.9216 458.1010 444.0801 411.3647 437.8486 457.3220 454.2063 460.4378 434.7328 448.7537 494.7110 429.2803 434.7328 406.2936 349.8975 400.7334 369.7553 396.7618 548.9929 471.5964 471.5964 443.6218 454.8116 8.9096 13.1249 13.0829 4.5315 13.0829 13.9235 13.1249 13.1249 4.3389 4.3313 13.7954 4.5315 4.3313 13.7954 13.9235 4.3389 4.3313 4.5084 4.5084 13.7954 4.5315 13.1249 13.0829 4.5315 13.0829 13.9235 13.1249 13.1249 4.3389 4.3313 13.7954 4.5315 4.3313 13.7954 13.9235 4.3389 4.3313 4.5084 4.5084 13.7954 4.5315 4.5084 4.5315 13.0829 4.5315 4.3313 4.5084 4.5084 13.7954 13.9235 4.3389 13.0829 13.9235 4.3389 4.3313 13.7954 13.9235 13.1249 13.1249 4.3389 13.0829 4.5084 4.5315 13.0829 4.5315 4.3313 4.5084 4.5084 13.7954 13.9235 4.3389 13.0829 13.9235 4.3389 4.3313 13.7954 13.9235 13.1249 13.1249 4.3389 13.0829 19 1 0.2098 22NOV13
3 Albania 80000 ALB0006 Non-OECD Albania 1 3 9 1.0 9 1996 Female Yes, for more than one year 6.0 No, never No, never No, never None None 1.0 Yes Yes No Yes No No <ISCED level 3B, 3C> Yes Yes Yes No Working full-time <for pay> <ISCED level 3A> Yes No Yes Yes Working full-time <for pay> Country of test Country of test Country of test NaN Language of the test Yes Yes Yes Yes No Yes Yes Yes Yes Yes No Yes No Yes 8001 8001 8001 Three or more Two Two One Two More than 500 books Agree Strongly agree Agree Agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Agree Strongly agree Strongly agree Agree Confident Very confident Very confident Confident Very confident Not very confident Very confident Confident NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Strongly agree Agree Strongly agree Strongly disagree Strongly agree Strongly disagree Likely Likely Very Likely Very Likely Very Likely Slightly likely Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Agree Strongly agree Strongly agree Strongly agree Courses after school Math Major in college Science Study harder Math Maximum classes Science Pursuing a career Science Sometimes Always or almost always Sometimes Never or rarely Always or almost always Never or rarely Never or rarely Never or rarely Most important Improve understanding learning goals more information Less than 2 hours a week 2 or more but less than 4 hours a week 4 or more but less than 6 hours a week I do not attend <out-of-school time lessons> in this subject NaN 6.0 6.0 7.0 2.0 3.0 Frequently Sometimes Frequently Rarely Frequently Rarely Frequently Sometimes Frequently Never heard of it Know it well, understand the concept Heard of it once or twice Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept Heard of it once or twice Know it well, understand the concept Know it well, understand the concept Heard of it once or twice Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept Know it well, understand the concept 60.0 NaN NaN 5.0 4.0 2.0 24.0 30.0 Frequently Frequently Frequently Frequently Frequently Frequently Rarely Rarely NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Not much like me Not much like me Very much like me Very much like me Somewhat like me Mostly like me Mostly like me Very much like me Mostly like me Very much like me probably not do this definitely do this definitely not do this probably do this 1.0 3.0 4.0 1.0 3.0 4.0 1.0 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN A Simple calculator 99 99 99 StQ Form A booklet 3 Standard set of booklets 15.58 -1.0 Albania: Lower secondary education NaN NaN NaN NaN 22.57 NaN NaN Albania Albania Albania NaN NaN 1.27 NaN NaN NaN 0.5359 0.7955 1.2219 0.8215 -0.89 2.0 ISCED 5A, 6 -0.69 NaN ISCED 5A, 6 NaN 0.14 NaN NaN NaN NaN NaN -0.40 NaN Native NaN NaN NaN 1.59 1.23 A ISCED level 2 General NaN Albanian NaN 300.0 0.9618 0.34 -0.2514 2.0389 ISCED 5A, 6 NaN NaN Housewife Bricklayers and related workers 0.9383 24.0 16.0 0.9918 Did not repeat a <grade> NaN NaN NaN 2.2350 NaN NaN NaN NaN Albanian NaN NaN NaN -0.23 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 533.2684 481.0796 489.6479 490.4269 533.2684 611.1622 486.5322 567.5417 541.0578 544.9525 597.1413 495.1005 576.8889 507.5635 556.6365 594.8045 473.2902 554.2997 537.1631 568.3206 471.7324 431.2276 460.8272 419.5435 456.9325 559.7523 501.3320 555.0787 467.0587 506.7845 580.7836 481.0796 555.0787 453.8168 491.2058 527.0369 444.4695 516.1318 403.9648 476.4060 401.2100 404.3872 387.7067 431.3938 401.2100 499.6643 428.7952 492.2044 512.7191 499.6643 8.4871 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 19 1 0.1999 22NOV13
4 Albania 80000 ALB0006 Non-OECD Albania 1 4 9 1.0 8 1996 Female Yes, for more than one year 6.0 No, never No, never No, never None None 1.0 Yes Yes No Yes No No <ISCED level 3B, 3C> No No No No Working full-time <for pay> <ISCED level 3A> Yes Yes No No Working full-time <for pay> Country of test Country of test Country of test NaN Language of the test Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes No 8001 8001 8002 Three or more Two One NaN One 11-25 books NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Strongly agree Disagree Agree Agree Disagree Strongly agree Disagree Agree Agree NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN relating to known new ways learning goals more information I do not attend <out-of-school time lessons> in this subject I do not attend <out-of-school time lessons> in this subject Less than 2 hours a week I do not attend <out-of-school time lessons> in this subject 10.0 2.0 2.0 0.0 0.0 3.0 Sometimes Sometimes Sometimes Sometimes Frequently Sometimes Frequently Rarely Frequently Heard of it often Heard of it often Heard of it often Know it well, understand the concept Heard of it a few times Know it well, understand the concept Never heard of it Know it well, understand the concept Know it well, understand the concept Never heard of it Know it well, understand the concept Never heard of it Know it well, understand the concept Know it well, understand the concept Heard of it often Heard of it often 45.0 45.0 45.0 3.0 3.0 2.0 NaN 28.0 Frequently Sometimes Frequently Rarely Frequently Frequently Sometimes Sometimes Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson NaN Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson Every Lesson Never or Hardly Ever Most Lessons Every Lesson Every Lesson Always or almost always NaN NaN NaN NaN NaN NaN NaN Never or rarely Never or Hardly Ever Never or Hardly Ever Never or Hardly Ever Never or Hardly Ever NaN NaN NaN Strongly agree Strongly agree Strongly agree Strongly agree NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 StQ Form C booklet 2 Standard set of booklets 15.67 -1.0 Albania: Lower secondary education 0.31 NaN NaN NaN 14.21 NaN NaN Albania Albania Albania -0.3788 NaN 1.27 1.80 NaN NaN 0.3220 0.7955 NaN 0.7266 0.24 2.0 ISCED 5A, 6 0.04 NaN ISCED 5A, 6 NaN -0.73 NaN NaN NaN NaN NaN -0.40 NaN Native NaN NaN NaN NaN NaN A ISCED level 2 General NaN Albanian NaN 135.0 NaN NaN NaN NaN ISCED 3B, C 135.0 1.6748 Housewife Cleaners and helpers in offices, hotels and other establishm NaN 17.0 16.0 NaN Did not repeat a <grade> 0.18 90.0 NaN NaN 0.7644 3.3108 2.3916 1.68 Albanian NaN NaN NaN -1.17 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 412.2215 498.6836 415.3373 466.7472 454.2842 538.4094 511.9255 553.9882 483.8838 479.2102 525.1675 529.0622 539.1883 516.5992 501.7993 658.3658 567.2301 669.2709 652.1343 645.1239 508.0308 522.0517 524.3885 495.5678 458.1788 524.3885 462.0735 494.0100 459.7367 471.4208 534.5147 455.8420 504.1362 454.2842 483.8838 521.2728 481.5470 503.3572 469.8629 478.4312 547.3630 481.4353 461.5776 425.0393 471.9036 438.6796 481.5740 448.9370 474.1141 426.5573 8.4871 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 19 1 0.1999 22NOV13
5 Albania 80000 ALB0006 Non-OECD Albania 1 5 9 1.0 10 1996 Female Yes, for more than one year 6.0 No, never No, never No, never One or two times None 2.0 Yes Yes Yes NaN NaN NaN She did not complete <ISCED level 1> No No No No Working part-time <for pay> <ISCED level 3B, 3C> No No No Yes Working part-time <for pay> Country of test Country of test Country of test NaN Language of the test Yes Yes No Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes 8001 8002 8001 Two One Two NaN One 101-200 books Disagree Strongly agree Disagree Disagree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Agree Confident Very confident NaN Very confident Very confident Confident Very confident Not very confident Strongly agree Strongly agree Agree Strongly agree Strongly agree Disagree Disagree Disagree Agree Agree Strongly agree Strongly agree Disagree Disagree Strongly agree Disagree Likely Likely Likely Likely Slightly likely Very Likely Strongly agree Strongly agree Agree Strongly agree Strongly agree Agree Strongly agree Strongly agree Strongly agree Courses after school Test Language Major in college Math Study harder Math Maximum classes Math Pursuing a career Math Always or almost always Always or almost always Often Often Sometimes NaN Sometimes Sometimes NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Every Lesson Most Lessons Every Lesson Most Lessons Some Lessons Some Lessons Some Lessons Most Lessons Some Lessons Most Lessons Every Lesson Most Lessons Every Lesson Some Lessons Most Lessons Most Lessons Every Lesson Most Lessons Always or almost always Often Sometimes Often Often Often Always or almost always Often Often Some Lessons Some Lessons NaN Most Lessons Never or Hardly Ever Strongly disagree Disagree Strongly agree Strongly agree Agree Strongly agree Agree Disagree Strongly agree Disagree Agree Agree Strongly agree Agree Agree Agree Agree Agree Agree Strongly disagree Strongly agree Strongly agree Strongly disagree Strongly agree Strongly disagree Strongly agree Strongly agree Strongly agree Disagree Strongly disagree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Strongly agree Agree Strongly agree Strongly disagree Agree Strongly agree Disagree NaN Mostly like me Very much like me Very much like me Very much like me Very much like me Very much like me Mostly like me Very much like me Mostly like me definitely do this definitely do this definitely do this definitely do this 1.0 2.0 1.0 2.0 1.0 2.0 1.0 1.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 99 99 99 StQ Form B booklet 4 Standard set of booklets 15.50 -1.0 Albania: Lower secondary education 1.02 1.38 1.2115 2.63 80.92 NaN -0.0784 Albania Albania Albania 0.5403 NaN 1.27 -0.08 NaN NaN NaN NaN 0.6400 NaN NaN 2.0 ISCED 3A, ISCED 4 -0.69 NaN ISCED 3A, ISCED 4 NaN -0.57 NaN NaN NaN NaN NaN 0.24 NaN Native NaN NaN NaN 1.59 0.30 A ISCED level 2 General NaN Albanian NaN NaN 1.8169 0.41 0.6584 1.6881 NaN NaN 0.6709 Housewife Economists 1.2387 NaN 12.0 1.0819 Did not repeat a <grade> -0.06 NaN -0.02 2.8039 0.7644 0.9374 0.4297 0.11 Albanian NaN NaN NaN -1.17 0.6517 0.4908 0.8675 0.0505 0.4940 0.9986 0.0486 0.9341 0.4052 0.0358 0.2492 1.2260 381.9209 328.1742 403.7311 418.5309 395.1628 373.3525 293.1220 364.0053 430.2150 403.7311 414.6362 385.8155 392.8260 448.9095 474.6144 417.7520 353.1002 424.7624 457.4778 459.0357 339.0793 309.4797 340.6372 369.4579 384.2577 373.3525 392.0470 347.6476 342.1950 342.1950 432.5518 431.7729 399.0575 369.4579 341.4161 297.0167 353.8791 347.6476 314.1533 311.0375 311.7707 141.7883 293.5015 272.8495 260.1405 361.5628 275.7740 372.7527 403.5248 422.1746 8.4871 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 12.7307 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 4.2436 4.2436 12.7307 4.2436 4.2436 4.2436 4.2436 12.7307 12.7307 4.2436 12.7307 12.7307 4.2436 4.2436 12.7307 12.7307 12.7307 12.7307 4.2436 12.7307 19 1 0.1999 22NOV13
In [ ]:
pisa2012.info()
<class 'pandas.core.frame.DataFrame'>
Index: 485490 entries, 1 to 485490
Columns: 635 entries, CNT to VER_STU
dtypes: float64(250), int64(17), object(368)
memory usage: 2.3+ GB
In [ ]:
', '.join(pisa2012.NC.unique())
Out[ ]:
'Albania, United Arab Emirates , Argentina, Australia, Austria, Belgium, Bulgaria , Brazil , Canada , Switzerland, Chile, Colombia , Costa Rica , Czech Republic , Germany, Denmark, Spain, Estonia, Finland, France , United Kingdom (excl.Scotland) , United Kingdom (Scotland), Greece , Hong Kong-China, Croatia, Hungary, Indonesia, Ireland, Iceland, Israel , Italy, Jordan , Japan, Kazakhstan , Republic of Korea, Liechtenstein, Lithuania, Luxembourg , Latvia , Macao-China, Mexico , Montenegro , Malaysia , Netherlands, Norway , New Zealand, Peru , Poland , Portugal , Qatar, China (Shanghai) , Perm (Russian Federation), United States of America , Romania, Russian Federation , Singapore, Serbia , Slovak Republic, Slovenia , Sweden , Chinese Taipei , Thailand , Tunisia, Turkey , Uruguay, Viet Nam '
In [ ]:
dummy_columns =    ['NC', 'ST03Q01', 'ST03Q02', 'ST04Q01',
    'PV1MATH', 'PV2MATH', 'PV3MATH', 'PV4MATH', 'PV5MATH',
    'PV1READ', 'PV2READ', 'PV3READ', 'PV4READ', 'PV5READ',
    'PV1SCIE', 'PV2SCIE', 'PV3SCIE', 'PV4SCIE', 'PV5SCIE']

dict = {
    'AGE': 'Age',
    'HISEI': 'Occupational',
    'PARED': 'Education',
    'HOMEPOS': 'Home Setup',
    'ESCS': 'Socioeconomic'
}

NC_renaming = {
    "United Kingdom (excl.Scotland)": "United Kingdom",
    "United Kingdom (Scotland)": "United Kingdom",
    "Hong Kong-China": "Greater China\n (excl.Mainland)",
    "Macao-China": "Greater China\n (excl.Mainland)",
    "China (Shanghai)": "Greater China\n (excl.Mainland)",
    "Perm (Russian Federation)": "Russian Federation",
    "United States of America" :"USA",
    "Singapore": "Greater China\n (excl.Mainland)",
    "Chinese Taipei": "Greater China\n (excl.Mainland)"
}

selected_columns = list(dict.keys()) + dummy_columns
pisadict2012clean = pisadict2012[selected_columns].rename(columns=dict)
pisa2012clean = pisa2012[selected_columns].rename(columns=dict)
In [ ]:
Dependencies = ['Education', 'Occupational', 'Home Setup']
Subjects = ['Math', 'Reading', 'Science']
In [ ]:
pisa2012clean['Country'] = pisa2012clean['NC'].str.rstrip().replace(NC_renaming)
pisa2012clean['Male'] = pisa2012clean['ST04Q01'].map({'Male': 1, 'Female': 0})
pisa2012clean['Math'] = pisa2012clean[[f'PV{i}MATH' for i in range(1, 6)]].mean(axis=1)
pisa2012clean['Reading'] = pisa2012clean[[f'PV{i}READ' for i in range(1, 6)]].mean(axis=1)
pisa2012clean['Science'] = pisa2012clean[[f'PV{i}SCIE' for i in range(1, 6)]].mean(axis=1)
pisa2012clean['Total'] = pisa2012clean[Subjects].mean(axis=1)
In [ ]:
pisadict2012clean = pisadict2012clean.loc[:, ~pisadict2012clean.columns.isin(dummy_columns)]
pisa2012clean = pisa2012clean.loc[:, ~pisa2012clean.columns.isin(dummy_columns)]
In [ ]:
Total_mean = pisa2012clean.groupby('Country')['Total'].mean()
order = Total_mean.sort_values(ascending=False).index.tolist()
In [ ]:
pisadict2012clean.T
Out[ ]:
x
Age Age of student
Occupational Highest parental occupational status
Education Highest parental education in years
Home Setup Home Possessions
Socioeconomic Index of economic, social and cultural status
In [ ]:
pisa2012clean.info()
<class 'pandas.core.frame.DataFrame'>
Index: 485490 entries, 1 to 485490
Data columns (total 11 columns):
 #   Column         Non-Null Count   Dtype  
---  ------         --------------   -----  
 0   Age            485374 non-null  float64
 1   Occupational   450621 non-null  float64
 2   Education      473091 non-null  float64
 3   Home Setup     479807 non-null  float64
 4   Socioeconomic  473648 non-null  float64
 5   Country        485490 non-null  object 
 6   Male           485490 non-null  int64  
 7   Math           485490 non-null  float64
 8   Reading        485490 non-null  float64
 9   Science        485490 non-null  float64
 10  Total          485490 non-null  float64
dtypes: float64(9), int64(1), object(1)
memory usage: 44.4+ MB

How is total performance distributed among participants?¶

In [ ]:
# Creating a histogram to visualize the distribution of total performance
plt.figure(figsize=(10, 6))
sb.histplot(pisa2012clean['Total'], kde=True, bins=30, color='skyblue')

# Setting the title, x-axis label, and y-axis label
plt.title('Distribution of Total Performance')
plt.xlabel('Total Performance')
plt.ylabel('Number of Participants');
No description has been provided for this image

It shows the frequency distribution of participants' total performance scores, suggesting a roughly normal distribution with a peak around the 400-500 range.¶

What is the distribution of educational levels among participants?¶

In [ ]:
plt.figure(figsize=(10, 6))

# Plotting the histogram of educational levels
sb.histplot(pisa2012clean['Education'], bins=20, color='purple')

# Setting the title, x-axis label, and y-axis label
plt.title('Distribution of Educational Levels')
plt.xlabel('Years of Education')
plt.ylabel('Number of Participants');
No description has been provided for this image

This histogram displays the count of participants according to the number of years of education they have completed, with notable peaks at 12 and 16 years, suggesting high school and college education levels respectively.¶

What is the age distribution of participants?¶

In [ ]:
# Plotting the histogram of age distribution
plt.figure(figsize=(10, 6))
sb.histplot(pisa2012clean['Age'], bins=30, color='green')

# Setting the title, x-axis label, and y-axis label
plt.title('Age Distribution of Participants')
plt.xlabel('Age')
plt.ylabel('Number of Participants');
No description has been provided for this image

The histogram shows that participant ages are concentrated around 15-16 years, which could indicate a study involving high school students.¶

Is there a difference in math performance between genders?¶

In [ ]:
# Creating a boxplot to visualize math performance by gender
plt.figure(figsize=(10, 6))
sb.boxplot(x='Male', y='Math', data=pisa2012clean, palette='pastel')

# Setting the title, x-axis label, and y-axis label
plt.title('Math Performance by Gender')
plt.xlabel('Gender (0 = Female, 1 = Male)')
plt.ylabel('Math Performance');
No description has been provided for this image

The box plot compares the distribution of math performance scores between male (1) and female (0) participants. It indicates median performance and the range of scores for each gender.¶

How does math performance vary across different age groups?¶

In [ ]:
# Plotting boxplot for Math performance by Age groups
plt.figure(figsize=(12, 8))
sb.boxplot(x='Age', y='Math', data=pisa2012clean, color='blue')

# Setting the title, x-axis label, and y-axis label
plt.title('Math Performance by Age Groups')
plt.xlabel('Age')
plt.ylabel('Math Performance')

# Rotating x-axis labels for better readability
plt.xticks(rotation=45);
No description has been provided for this image

It provides a box plot for each age group, showing the central tendency and spread of math performance within those groups.¶

Is there a correlation between socioeconomic status and total performance¶

In [ ]:
# Create scatter plot
plt.figure(figsize=(10, 6))
sb.scatterplot(x='Socioeconomic', y='Total', data=pisa2012clean, hue='Male', palette='coolwarm', alpha=.6)

# Set title and axis labels
plt.title('Relationship Between Socioeconomic Status and Total Performance')
plt.xlabel('Socioeconomic Index')
plt.ylabel('Total Performance');
No description has been provided for this image

The scatter plot depicts individual data points representing participants, colored by gender, against socioeconomic index scores and their corresponding total performance.¶

What is the average socioeconomic status in each country?¶

In [ ]:
# Calculating the average socioeconomic status by country and sorting the values
average_socioeconomic_by_country = pisa2012clean.groupby('Country')['Socioeconomic'].mean().sort_values()

# Plotting the bar chart
plt.figure(figsize=(25, 8))
average_socioeconomic_by_country.plot(kind='bar', color='orange')

# Setting the title, x-axis label, and y-axis label
plt.title('Average Socioeconomic Status by Country')
plt.xlabel('Country')
plt.ylabel('Average Socioeconomic Status')

# Rotating x-axis labels for better readability
plt.xticks(rotation=45, ha="right");
No description has been provided for this image

The bar chart ranks countries by their average socioeconomic status.¶

How does average reading performance compare between genders across different countries?¶

In [ ]:
# Grouping data by 'Country' and 'Male' and calculating the average reading performance
average_reading_by_gender_country = pisa2012clean.groupby(['Country', 'Male'])['Reading'].mean().unstack()

# Sorting the data based on the specified order
average_reading_by_gender_country = average_reading_by_gender_country.loc[order]

# Plotting the bar chart
average_reading_by_gender_country.plot(kind='bar', figsize=(25, 8), color=['orange','blue'])

# Setting the title, x-axis label, and y-axis label
plt.title('Average Reading Performance by Gender and Country')
plt.xlabel('Country')
plt.ylabel('Average Reading Performance')

# Rotating x-axis labels for better readability
plt.xticks(rotation=45, ha="right")

# Adding legend
plt.legend(title='Gender', labels=['Female', 'Male']);
No description has been provided for this image

It shows a side-by-side comparison of male and female reading performance averages for each country.¶

What is the gender distribution among participants?¶

In [ ]:
# Counting the distribution of genders
gender_counts = pisa2012clean['Male'].value_counts()

# Plotting the pie chart
plt.figure(figsize=(6, 6))
plt.pie(gender_counts, labels=['Female', 'Male'], autopct='%1.1f%%', startangle=90, colors=['orange','blue'])

# Setting the title for the plot
plt.title('Gender Distribution of Participants');
No description has been provided for this image

It's a pie chart illustrating the percentage of male and female participants, indicating a nearly even split.¶

What is the cumulative distribution of socioeconomic status among participants?¶

In [ ]:
# Create a figure with a specific size
plt.figure(figsize=(6, 6))

# Plot a cumulative histogram of 'Socioeconomic' pisa2012clean
sb.histplot(pisa2012clean['Socioeconomic'], bins=30, cumulative=True, element="step", fill=False, color='navy')

# Set title, x-axis label, and y-axis label
plt.title('Cumulative Distribution of Socioeconomic Status')
plt.xlabel('Socioeconomic Status')
plt.ylabel('Cumulative Number of Participants');
No description has been provided for this image

It shows how the socioeconomic status of participants accumulates across the range of status levels.¶

How many participants are there from each country in this study?¶

In [ ]:
plt.figure(figsize=(25, 8))
    
# Plotting countplot with x and y axes swapped and applying order to countries
sb.countplot(x='Country', data=pisa2012clean, order=order, color='blue')
    
# Setting plot title, labels, and displaying the plot
plt.title('Number of Participants by Country')
plt.xlabel('Country')
plt.ylabel('Number of Participants')
plt.xticks(rotation=45, ha="right");
No description has been provided for this image

It displays the number of participants from various countries, with some countries having significantly higher numbers of participants than others.¶

What is the percentage of male and female participants in each country?¶

In [ ]:
# Group pisa2012clean by 'Country' and calculate percentage distribution of 'Male' values
gender_distribution_per_country = pisa2012clean.groupby('Country')['Male'].value_counts(normalize=True).unstack().fillna(0) * 100
# Reorder the rows based on the specified order
gender_distribution_per_country = gender_distribution_per_country.loc[order]

# Plotting
gender_distribution_per_country.plot(kind='bar', stacked=True, color=['orange','blue'], figsize=(25, 8))

# Setting plot title, labels, and legend
plt.title('Percentage of Male and Female Participants by Country')
plt.xlabel('Country')
plt.ylabel('Percentage')
plt.xticks(rotation=45, ha="right")
plt.legend(title='Gender', labels=['Female', 'Male']);
No description has been provided for this image

Each bar represents a country with proportions of male and female participants stacked on top of each other, showing gender distribution across countries.¶

In [ ]:
def plot_average_total_score():
    # Calculating mean total scores for males and females by country
    male_mean = pisa2012clean.query("Male == 1").groupby('Country')['Total'].mean()
    female_mean = pisa2012clean.query("Male == 0").groupby('Country')['Total'].mean()

    # Setting up y-axis ticks
    ybins = np.arange(10, 900 + 20, 20)
    yticks = ybins[::1] - 10

    # Creating the plot
    fig, ax1 = plt.subplots(figsize=(25, 10))
    plt.yticks(yticks)
    plt.xticks(rotation=60, ha='right')
    
    # Boxplot showing the interquartile range (IQR)
    sb.boxplot(data=pisa2012clean, x='Country', y='Total', order=order, showfliers=False, whis=0, color='lightgray', ax=ax1, width=.5, linewidth=.5)
    
    # Adding gridlines
    plt.grid(True, linestyle='--', linewidth=.3)

    # Plotting average markers for each country
    for i, country in enumerate(order):
        mean_val = Total_mean[country]
        mean_val_male = male_mean[country]
        mean_val_female = female_mean[country]
 
        ax1.plot(i, mean_val_male, marker='o', color='blue', markersize=8)
        ax1.plot(i, mean_val_female, marker='o', color='orange', markersize=8)
        ax1.plot(i, mean_val, marker='x', color='black', markersize=8)

    # Setting labels and title
    ax1.set_ylabel('Total Scores', fontsize=16)
    ax1.set_xlabel('')
    plt.title('Total Scores: IQR with Avg. Markers by Countries', fontsize=24)
    
    # Adding legend
    legend_labels = ['Total Avg.', 'Male Avg.', 'Female Avg.']
    legend_handles = [plt.Line2D([0], [0], marker='x', color='black', markersize=24, linestyle='None'),
                      plt.Line2D([0], [0], marker='o', color='blue', markersize=24, linestyle='None'),
                      plt.Line2D([0], [0], marker='o', color='orange', markersize=24, linestyle='None')]
    plt.legend(legend_handles, legend_labels, fontsize=24)

What is the distribution of total scores among participants, and how does the average score differ by gender across countries?¶

In [ ]:
plot_average_total_score()
No description has been provided for this image

The box plots show the interquartile range (IQR) of total scores in various countries, with markers indicating the average scores for males and females.¶

In [ ]:
def plot_score_distribution(pisa_2012_clean, Subjects):
    # Create a figure with appropriate size
    plt.figure(figsize=[25, 1+9/len(Subjects)])
    
    # Define bin edges for x and y axes
    xbins = np.arange(10, 900 + 20, 20)
    ybins = np.arange(0, .0042 + .0002, .0002)
    
    # Define tick locations for x and y axes
    xticks = xbins[::len(Subjects)] - 10
    yticks = ybins[::len(Subjects)]
    
    # Iterate over each subject and plot the distribution by gender
    for col_index, Subject in enumerate(Subjects):
        ax = plt.subplot(1, len(Subjects), col_index + 1)
        
        # Plot kernel density estimate (KDE) for male and female scores
        sb.kdeplot(data=pisa_2012_clean[pisa_2012_clean['Male'] == 1][Subject], label='Male', color='blue', ax=ax)
        sb.kdeplot(data=pisa_2012_clean[pisa_2012_clean['Male'] == 0][Subject], label='Female', color='orange', ax=ax)    
        
        # Set tick locations and labels for x and y axes
        ax.set_xticks(xticks)
        ax.set_yticks(yticks)
        ax.set_xticklabels(xticks, rotation=15) 
        ax.set_yticklabels((yticks*1000).round(1))
        
        # Add grid lines and set axis limits
        ax.grid(axis='y', linestyle='--', alpha=.5)
        ax.set_xlim(0, 910)
        ax.set_ylim(0, .0042)
        
        # Set title, x-axis label, and y-axis label
        ax.set_title(Subject, fontsize=16)
        ax.set_xlabel(f'{Subject} Scores', fontsize=16)
        ax.set_ylabel('Parts per thousand' if col_index == 0 else '', fontsize=16)
        
        # Add legend
        ax.legend(loc='lower center', fontsize=8+24/len(Subjects))

    # Set super title
    plt.suptitle(f'Distribution of Student Scores {"across Subjects " if Subjects != ["Total"] else ""}by Gender', fontsize=24, y=.89+len(Subjects)/18)

What is the distribution of student scores by gender?¶

In [ ]:
plot_score_distribution(pisa2012clean, Subjects=['Total'])
No description has been provided for this image

The plot compares the distribution curves for male and female participants, showing where scores are most concentrated.¶

How are student scores distributed across different subjects by gender?¶

In [ ]:
plot_score_distribution(pisa2012clean, Subjects)
No description has been provided for this image

There are separate density plots for math, reading, and science scores, each comparing the score distributions for male and female students.¶

In [ ]:
def plot_dependent_distribution(pisa_2012_clean, Subjects, Dependencies):
    # Create subplots grid
    fig, axs = plt.subplots(len(Dependencies), len(Subjects), figsize=(25, 12), squeeze=False)   
    
    # Define bins and xticks
    bins = np.arange(10, 900 + 20, 20)
    xticks = bins[::len(Subjects)] - 10

    # Iterate over rows and columns
    for row_index, Dependency in enumerate(Dependencies):
        for col_index, Subject in enumerate(Subjects):
            # Add jitter to the dependent variable
            jittered_dependent = pisa_2012_clean[Dependency] + np.random.uniform(-.35, .35, size=len(pisa_2012_clean))
            # Calculate correlation coefficient
            correlation = pisa_2012_clean[Subject].corr(pisa_2012_clean[Dependency])
            # Create hexbin plot
            hb = axs[row_index, col_index].hexbin(pisa_2012_clean[Subject], jittered_dependent, bins='log', vmin=1, vmax=2000)
            
            # Customize x-axis
            axs[row_index, col_index].set_xticks(xticks)
            axs[row_index, col_index].set_xticklabels(xticks, rotation=15)
            axs[row_index, col_index].set_xlim(0, 910)
            
            # Add correlation coefficient text
            axs[row_index, col_index].text(.84, .02, f'ρ = {correlation:.2f}', transform=axs[row_index, col_index].transAxes, fontsize=54/len(Subjects)-4)
            
            # Set title, x-axis label, and y-axis label
            axs[row_index, col_index].set_title(f'{Subject} | {Dependency}', fontsize=10)
            axs[row_index, col_index].set_xlabel(f'{Subject} Scores' if row_index == len(Dependencies)-1 else '', fontsize=16)
            axs[row_index, col_index].set_ylabel(f'{Dependency} Index' if col_index == 0 else '', fontsize=16)

        # Add colorbar
        cbar_ax = fig.add_axes([.91, .11 + row_index * .272, .01, (.815 / len(Dependencies))-.045])
        cbar = fig.colorbar(hb, cax=cbar_ax)
        cbar.set_ticks([1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000])
        cbar.ax.yaxis.set_major_formatter(ScalarFormatter())
        cbar.set_label('Frequency', fontsize=16)

    # Add overall title
    plt.suptitle(f'Distribution of Student Scores {(Subjects != ["Total"]) * "across Subjects "}depending on Parental Factors{(Dependencies == ["Socioeconomic"]) * " together"}', fontsize=24, y=.93)

What is the relationship between student scores and their socioeconomic background?¶

In [ ]:
plot_dependent_distribution(pisa2012clean, Subjects=["Total"], Dependencies=["Socioeconomic"])
No description has been provided for this image

This hexbin plot shows concentrations of student scores against socioeconomic index, with a color density indicating the frequency of scores. The correlation coefficient (ρ) suggests the strength of the relationship.¶

How do parental factors such as education, occupation, and home setup influence student scores across different subjects?¶

In [ ]:
plot_dependent_distribution(pisa2012clean, Subjects, Dependencies)
No description has been provided for this image

Each scatter plot shows student scores against different parental indices for math, reading, and science. Correlation coefficients are provided for each factor's relationship with the scores.¶

In [ ]:
pisadict2012clean.T.to_csv('./data/pisadict2012clean.csv')
pisa2012clean.to_csv('./data/pisa2012clean.csv', index=False)